package com.xbongbong.saas.domain.entity;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.xbongbong.paas.toolbox.util.DateUtil;
import com.xbongbong.paas.enums.DelEnum;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

/**
 * 调拨单产品
 *
 * @author feng.zheng
 * @version v1.0
 * @date 2019/2/19 14:41
 * @since v1.0
 */
@Getter
@Setter
public class TransferProductEntity extends BusinessUnitProductEntity implements Serializable {
    private static final long serialVersionUID = -1671628414157824485L;

    /**
     * 调拨单产品id
     */
    private Long id;
    /**
     * 公司id
     */
    private String corpid;
    /**
     * 调拨单id
     */
    private Long transferId;
    /**
     * 父产品id
     */
    private Long parentId;
    /**
     * 产品id
     */
    private Long productId;
    /**
     * 产品名称
     */
    private String productName;
    /**
     * 产品编号
     */
    private String productNo;
    /**
     * 产品规格
     */
    private String productSpecification;
    /**
     * 产品数量
     */
    private Double productNum;
    /**
     * 产品单位
     */
    private String productUnit;
    /**
     * 产品价格
     */
    private Double productPrice;
    /**
     * 添加时间
     */
    private Long addTime;
    /**
     * 更新时间
     */
    private Long updateTime;
    /**
     * 删除标志
     */
    private Integer del;

    private String memo;

    /**
     * 模板id
     */
    private Long formId;
    /**
     * 调拨入库仓库
     */
    private Long intoWarehouseId;
    /**
     * 调拨出库仓库
     */
    private Long outWarehouseId;
    /**
     * sort
     */
    private Integer sort;

    private JSONObject data;
    /**
     * 产品图片地址(扩展字段)
     */
    private String imageUrl;
    private Integer categoryId;
    /**
     * 产品条码
     */
    private String barcode;
    /**
     * 产品图片
     */
    private JSONArray imageUrlArray;
    /**
     * 已调拨出库数量
     */
    private Double outstockNum;
    /**
     * 已调拨入库数量
     */
    private Double instockNum;
    /**
     * 产品批次
     */
    private String batch;
    /**
     *
     * 生产日期
     *
     * */
    private Long produceDate;
    /**
     *
     * 保质期（秒）
     *
     * */
    private Long guaranteePeriod;



    public TransferProductEntity() {
        long now = (long) DateUtil.getInt();
        this.corpid = "";
        this.transferId = 0L;
        this.productId = 0L;
        this.productName = "";
        this.productNo = "";
        this.productSpecification = "";
        this.productNum = 0d;
        this.productUnit = "";
        this.productPrice = 0d;
        this.updateTime = now;
        this.addTime = now;
        this.del = DelEnum.NORMAL.getDel();
        this.outstockNum = 0D;
        this.instockNum= 0D;
    }


}
